# 2013/5/1 version beta 0.6.4.9

import RPi.GPIO as GPIO

GPIO.cleanup()
GPIO.setmode(GPIO.BCM)

GPIO.setup(27,GPIO.OUT)
GPIO.setup(22,GPIO.OUT)
GPIO.setup(10,GPIO.OUT)
GPIO.setup(9,GPIO.OUT)
GPIO.setup(11,GPIO.OUT)
GPIO.setup(24,GPIO.OUT)
GPIO.setup(25,GPIO.OUT)
GPIO.setup(8,GPIO.OUT)



#s = raw_input('--> ')

while True:
	if GPIO.input(27):
		print "encendido port08"
	elif GPIO.input(22):
		print "encendido port09"
	elif GPIO.input(10):
		print "encendido port10"
	elif GPIO.input(9):
		print "encendido port11"
	elif GPIO.input(11):
		print "encendido port12"
	elif GPIO.input(24):
		print "encendido port13"
	elif GPIO.input(25):
		print "encendido port14"
	elif GPIO.input(8):
		print "encendido port15"